AC_PREREQ(2.54)

AC_INIT(src/main.c)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_PROG_MAKE_SET

AM_SANITY_CHECK
AM_INIT_AUTOMAKE(rdffs, 0.1)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_PROG_CC
AC_ISC_POSIX
AC_PROG_INSTALL
AM_PROG_CC_STDC

AC_HEADER_STDC
AC_CHECK_HEADERS(stdio.h string.h stdlib.h errno.h fcntl.h)

AC_FUNC_VPRINTF

PKG_CHECK_MODULES(libraries, [
  glib-2.0 >= 2.6.0 
  fuse >= 2.6.0
])

AC_CHECK_HEADER(redland.h,,AC_MSG_ERROR(librdf is required to compile morla))
AC_CHECK_LIB(rdf,librdf_node_get_type,, AC_MSG_ERROR(librdf is required to compile morla))

LDFLAGS="$LDFLAGS $libraries_LIBS"
CFLAGS="$CFLAGS $libraries_CFLAGS -DG_DISABLE_DEPRECATED -Wall"

AC_OUTPUT([
Makefile
src/Makefile
])

